import request from '@/utils/request'

export default {
  // 条件分页查询
  getPageList(page, limit, searchObj) {
    return request({
      url: `/eduservice/coursefront/courseFrontPageList/${page}/${limit}`,
      method: 'post',
      data: searchObj
    })
  },
  // 条件分页查询
  getMyCoursePageList(page, limit, searchObj) {
    return request({
      url: `/eduservice/coursefront/getMyCoursePageList/${page}/${limit}`,
      method: 'post',
      data: searchObj
    })
  },
  // 获取课程二级分类
  getNestedTreeList() {
    return request({
      url: `/eduservice/subject/nestedList`,
      method: 'get'
    })
  },
  getFrontCourseInfo(courseId) {
    return request({
      url: `/eduservice/coursefront/getFrontCourseInfo/${courseId}`,
      method: 'post'
    })
  },
  getCoursesByUser(){
    return request({
      url: `/eduservice/coursefront/getCoursesByUser`,
      method: 'get'
    })
  }
}
